{include file = $admin_header1}
{include file = $admin_header2}
{include file = $admin_leftsidebar}
<script type="text/javascript">
{literal}
$(document).ready(function() {
	// validate signup form on keyup and submit
	var userid = document.getElementById('userid').value;
	var validator = $("#frmUserProfile").validate({
		errorElement:'div',
		rules: {
         		first_name:{
				required: true,
				maxlength: 25
			},
			last_name:{
				required: true,
				maxlength: 25
			},
			email: {
				required: true,
				email: true
			},

		},
		messages: {
			first_name:{
				required: "Enter first name",
				maxlength: "required maximum 25 characters"
			},
			last_name:{
				required: "Enter last name",
				maxlength: "required maximum 25 characters"
			},
			email: {
				required: "Please enter email address",
				email: "Please enter a valid email address",
				remote: jQuery.format("{0} is already in use or marked as spam.")
			},

		},

		// set this class to error-labels to indicate valid fields
		success: function(label) {
			// set &nbsp; as text for IE
			label.hide();
		}
	});
	// propose username by combining first- and lastname
	$("#username").focus(function() {
		var first_name = $("#first_name").val();
		var last_name = $("#last_name").val();
		if(first_name && last_name && !this.value) {
			this.value = first_name + "." + last_name;
			this.value = this.value.toLowerCase();
		}
	});
});
{/literal}
</script>

<div class="middel_panel">
<h1 class="type2">Edit Admin Users</h1>
<div class="holdthisTop">
	<div class="breadcrumb"><!--<a href="{$siteroot}/admin/index.php">Home</a>&nbsp;&gt;&nbsp;--><a href="{$site_path}/admin/user/">Manage Admin </a>&nbsp;&gt;&nbsp;Edit Admin</div>
  <div align="center">
     {$msg} 
  </div>
  <div class="fl width60">
    <form name="frmUserProfile" id="frmUserProfile" action="" method="post" style="padding-top:20px;">
      <input type="hidden" name="user_id" id="user_id" value="{$user->getId()}" />
      <table cellspacing="6" cellpadding="2" width="100%" border="0" class="datagrid">
	<tr><TD colspan="2"></TD></tr>
        <tr>
          <td align="right" valign="top">
             First name <font color="red">*</font> : 
          </td>
          <td>
            <input type="text" maxlength="20" value="{$user->getFirstName()}" name="first_name" id="first_name" class="textbox width60"/>
          </td>
        </tr>
        <tr>
          <td align="right" valign="top">
             Last name <font color="red">*</font> : 
          </td>
          <td>
            <input type="text" maxlength="20" value="{$user->getLastName()}" name="last_name" class="textbox width60"/>
          </td>
        </tr>
        <tr>
          <td align="right" valign="top">
             Email address <font color="red">*</font> : 
          </td>
          <td>
            <input type="text" maxlength="70" value="{$user->getEmail()}" name="email" id="email" class="textbox width60"/>
          </td>
        </tr>
        <tr>
          <td align="right" valign="top">
             Password:
          </td>
          <td>
            <input type="password" maxlength="15" name="password" id="password" class="textbox width60"/>
            <br/>
             Only enter if you want to reset pass. 
          </td>
        </tr>
        <tr>
          <td align="right" valign="top">
             Country:
          </td>
          <td>
            <select name="countryid" id="countryid" class="selectbox"> {section name=i loop=$country} <option value="{$country[i].countryid}" {if $user->getCountryId() eq $country[i].countryid}selected="selected"{/if}>
              {$country[i].country}
            </option> {/section} </select>
          </td>
        </tr>
        <tr>
          <td>
          </td>
          <td>
		<div class="buttons"><input type="submit" name="Submit" value="Save"/>  </div>
		<div class="buttons"><input type="button" value="Cancel" onclick="javascript: return history.back();" /></div>
          </td>
        </tr>
      </table>
    </form>
  </div>
</div>
 </div>
  </td>
  <div class="clr">
  </div>
</div>
{include file = $admin_footer}
